﻿using System;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace ruscehproj2
{
    public partial class bsh002 : Form
    {
        int i = 1;
        int i2 = 1;
     public   int angle1 = 0;
        int angle = 0;
        int x1 = 250;
        int y1 = 280;
        int r_line = 90;
        bool isActive = false;
        // int angle_line = 130;
        public bsh002()
        {
            InitializeComponent();
        }

        public bool getState()
        {
            return isActive;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.i2++;
            if (this.i2 > 3) this.i2 = 1;

            switch (this.i2)
            {
                case 1: button2.BackgroundImage = Resources.set4; angle1 = 0; break;
                case 2: button2.BackgroundImage = Resources.set5; angle1 = 15; break;
                case 3: button2.BackgroundImage = Resources.set6; angle1 = 32; break;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.i++;
            if (this.i > 4) this.i = 1;
 
            switch (this.i)
            {
                case 1: button1.BackgroundImage = Resources.set01; break;
                case 2: button1.BackgroundImage = Resources.set02; break;
                case 3: button1.BackgroundImage = Resources.set03; break;
                case 4: button1.BackgroundImage = Resources.set04; break;
            }
        }
   
        int angle_line = 135;

     

        private void bsр002_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Hide();
            }
        }

        private void bsр002_Load(object sender, EventArgs e)
        {
            if (FormManager.hlp.helpEnabled())
            {
                if (FormManager.BSH001.getState())
                {
                    if (isActive)
                    {
                        FormManager.hlp.setHelpId("end");
                    }
                    else FormManager.hlp.setHelpId("vkl");
                    FormManager.hlp.hlpRefresh();
                }
                else
                {
                    FormManager.hlp.notSoFast();
                }



                FormManager.hlp.Show();
            }
            
        }

        private void bsр002_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (isActive) FormManager.hlp.setHelpId("7");
            FormManager.hlp.Hide();
        }

        private void vkl_Click(object sender, EventArgs e)
        {
            if (FormManager.BSH001.getState())
            {
                isActive = true;
                FormManager.hlp.setHelpId("end");
                FormManager.hlp.hlpRefresh();
            }
        }

       
    }
}
